"""storm URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.urls import path
from rest_framework.routers import DefaultRouter
from .views import *

app_name='interface'

router=DefaultRouter()
router.register('product',ProductViewSets,basename='product')
router.register('host',HostViewSets,basename='host')
router.register('api',ApiViewSets,basename='case')


urlpatterns = [
    path('index',IndexView.as_view(),name='index'),
    #搜索路由地址
    path('products',ProductView.as_view(),name='products'),
    path('hosts',HostView.as_view(),name='hosts'),
    path('apis',ApiSoView.as_view(),name='apis'),
    path('suites',SuiteSoView.as_view(),name='suites'),

    path('run/api/<api_id>',RunApiView.as_view(),name='run_api'),
    path('prod/api/<api_id>',RunApiPerformance.as_view(),name='prod_api'),
    path('suite/',SuiteView.as_view(),name='suite'),
    path('suite/<int:suite_id>',SuiteView.as_view(),name='edit_suite'),
    path('run/suite/<int:suite_id>',SuiteRunView.as_view(),name='run_suite'),
    path('records',RecordView.as_view(),name='records'),
]+router.urls


